(calc-date-notation): Check to see if the format is whitespace
authorJay Belanger <jay.p.belanger@gmail.com>
Mon, 2 Nov 2009 02:56:43 +0000 (02:56 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Mon, 2 Nov 2009 02:56:43 +0000 (02:56 +0000)
instead of only the empty string.

lisp/calc/calc-forms.el

index 99a8b949c42a0235bd4d4fa46d9d2effdd578431..0845fb151abaa91354f5d3163f2bc7e392893ed5 100644 (file)
@@ -81,7 +81,7 @@
 (defun calc-date-notation (fmt arg)
   (interactive "sDate format (e.g., M/D/YY h:mm:ss): \nP")
   (calc-wrapper
-   (if (equal fmt "")
+   (if (string-match-p "\\`\\s-*\\'" fmt)
        (setq fmt "1"))
    (if (string-match "\\` *[0-9] *\\'" fmt)
        (setq fmt (nth (string-to-number fmt) calc-standard-date-formats)))